3.1.57 \(\int \frac {1+x^2}{1+5 x^2+x^4} \, dx\)

Optimal. Leaf size=49 \[ \frac {\tan ^{-1}\left (\sqrt {\frac {2}{5+\sqrt {21}}} x\right )}{\sqrt {7}}+\frac {\tan ^{-1}\left (\sqrt {\frac {1}{2} \left (5+\sqrt {21}\right )} x\right )}{\sqrt {7}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1163, 203} \begin {gather*} \frac {\tan ^{-1}\left (\sqrt {\frac {2}{5+\sqrt {21}}} x\right )}{\sqrt {7}}+\frac {\tan ^{-1}\left (\sqrt {\frac {1}{2} \left (5+\sqrt {21}\right )} x\right )}{\sqrt {7}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x^2)/(1 + 5*x^2 + x^4),x]

[Out]

ArcTan[Sqrt[2/(5 + Sqrt[21])]*x]/Sqrt[7] + ArcTan[Sqrt[(5 + Sqrt[21])/2]*x]/Sqrt[7]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1163

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && GtQ[b^2
 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {1+x^2}{1+5 x^2+x^4} \, dx &=\frac {1}{14} \left (7-\sqrt {21}\right ) \int \frac {1}{\frac {5}{2}-\frac {\sqrt {21}}{2}+x^2} \, dx+\frac {1}{14} \left (7+\sqrt {21}\right ) \int \frac {1}{\frac {5}{2}+\frac {\sqrt {21}}{2}+x^2} \, dx\\ &=\frac {\tan ^{-1}\left (\sqrt {\frac {2}{5+\sqrt {21}}} x\right )}{\sqrt {7}}+\frac {\tan ^{-1}\left (\sqrt {\frac {1}{2} \left (5+\sqrt {21}\right )} x\right )}{\sqrt {7}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 83, normalized size = 1.69 \begin {gather*} \frac {\left (\sqrt {21}-3\right ) \tan ^{-1}\left (\sqrt {\frac {2}{5-\sqrt {21}}} x\right )}{\sqrt {42 \left (5-\sqrt {21}\right )}}+\frac {\left (3+\sqrt {21}\right ) \tan ^{-1}\left (\sqrt {\frac {2}{5+\sqrt {21}}} x\right )}{\sqrt {42 \left (5+\sqrt {21}\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x^2)/(1 + 5*x^2 + x^4),x]

[Out]

((-3 + Sqrt[21])*ArcTan[Sqrt[2/(5 - Sqrt[21])]*x])/Sqrt[42*(5 - Sqrt[21])] + ((3 + Sqrt[21])*ArcTan[Sqrt[2/(5
+ Sqrt[21])]*x])/Sqrt[42*(5 + Sqrt[21])]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1+x^2}{1+5 x^2+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(1 + x^2)/(1 + 5*x^2 + x^4),x]

[Out]

IntegrateAlgebraic[(1 + x^2)/(1 + 5*x^2 + x^4), x]

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 31, normalized size = 0.63 \begin {gather*} \frac {1}{7} \, \sqrt {7} \arctan \left (\frac {1}{7} \, \sqrt {7} {\left (x^{3} + 6 \, x\right )}\right ) + \frac {1}{7} \, \sqrt {7} \arctan \left (\frac {1}{7} \, \sqrt {7} x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+5*x^2+1),x, algorithm="fricas")

[Out]

1/7*sqrt(7)*arctan(1/7*sqrt(7)*(x^3 + 6*x)) + 1/7*sqrt(7)*arctan(1/7*sqrt(7)*x)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 26, normalized size = 0.53 \begin {gather*} \frac {1}{14} \, \sqrt {7} {\left (\pi \mathrm {sgn}\relax (x) + 2 \, \arctan \left (\frac {\sqrt {7} {\left (x^{2} - 1\right )}}{7 \, x}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+5*x^2+1),x, algorithm="giac")

[Out]

1/14*sqrt(7)*(pi*sgn(x) + 2*arctan(1/7*sqrt(7)*(x^2 - 1)/x))

________________________________________________________________________________________

maple [B]  time = 0.05, size = 136, normalized size = 2.78 \begin {gather*} -\frac {2 \sqrt {21}\, \arctan \left (\frac {4 x}{2 \sqrt {7}-2 \sqrt {3}}\right )}{7 \left (2 \sqrt {7}-2 \sqrt {3}\right )}+\frac {2 \arctan \left (\frac {4 x}{2 \sqrt {7}-2 \sqrt {3}}\right )}{2 \sqrt {7}-2 \sqrt {3}}+\frac {2 \sqrt {21}\, \arctan \left (\frac {4 x}{2 \sqrt {7}+2 \sqrt {3}}\right )}{7 \left (2 \sqrt {7}+2 \sqrt {3}\right )}+\frac {2 \arctan \left (\frac {4 x}{2 \sqrt {7}+2 \sqrt {3}}\right )}{2 \sqrt {7}+2 \sqrt {3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+1)/(x^4+5*x^2+1),x)

[Out]

-2/7*21^(1/2)/(2*7^(1/2)-2*3^(1/2))*arctan(4*x/(2*7^(1/2)-2*3^(1/2)))+2/(2*7^(1/2)-2*3^(1/2))*arctan(4*x/(2*7^
(1/2)-2*3^(1/2)))+2/7*21^(1/2)/(2*7^(1/2)+2*3^(1/2))*arctan(4*x/(2*7^(1/2)+2*3^(1/2)))+2/(2*7^(1/2)+2*3^(1/2))
*arctan(4*x/(2*7^(1/2)+2*3^(1/2)))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} + 1}{x^{4} + 5 \, x^{2} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+5*x^2+1),x, algorithm="maxima")

[Out]

integrate((x^2 + 1)/(x^4 + 5*x^2 + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 29, normalized size = 0.59 \begin {gather*} \frac {\sqrt {7}\,\left (\mathrm {atan}\left (\frac {\sqrt {7}\,x^3}{7}+\frac {6\,\sqrt {7}\,x}{7}\right )+\mathrm {atan}\left (\frac {\sqrt {7}\,x}{7}\right )\right )}{7} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 + 1)/(5*x^2 + x^4 + 1),x)

[Out]

(7^(1/2)*(atan((6*7^(1/2)*x)/7 + (7^(1/2)*x^3)/7) + atan((7^(1/2)*x)/7)))/7

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 41, normalized size = 0.84 \begin {gather*} \frac {\sqrt {7} \left (2 \operatorname {atan}{\left (\frac {\sqrt {7} x}{7} \right )} + 2 \operatorname {atan}{\left (\frac {\sqrt {7} x^{3}}{7} + \frac {6 \sqrt {7} x}{7} \right )}\right )}{14} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+1)/(x**4+5*x**2+1),x)

[Out]

sqrt(7)*(2*atan(sqrt(7)*x/7) + 2*atan(sqrt(7)*x**3/7 + 6*sqrt(7)*x/7))/14

________________________________________________________________________________________